home *** CD-ROM | disk | FTP | other *** search
/ Nebula 1 / Nebula One.iso / Misc / BMV / Source / FooFaraw.m < prev    next >
Encoding:
Text File  |  1995-06-12  |  1.1 KB  |  70 lines

  1. #import "FooFaraw.h"
  2. #import <appkit/NXImage.h>
  3. #import <appkit/Window.h>
  4. #import <appkit/Panel.h>                // for NXRunAlertPanel()
  5. #import <dpsclient/wraps.h>
  6. #import <libc.h>
  7. #import <math.h>
  8.  
  9. @implementation FooFaraw : View
  10. - (BOOL) advancedCommandSet {return YES;}
  11. - (BOOL) ignoreMouseMovement {return YES;}
  12.  
  13. - commandKey
  14. {
  15.   bigMode = (bigMode ? NO : YES);
  16.   return self;
  17. }
  18.  
  19.  
  20. - initFrame:(NXRect *)frameRect
  21. {
  22.   [super initFrame:frameRect];
  23.   [self newSize];
  24.   winNum=[[self window] windowNum];
  25.   return self;
  26. }
  27.  
  28. - sizeTo:(NXCoord)width :(NXCoord)height
  29. {
  30.   [super sizeTo:width :height];
  31.   [self newSize];
  32.   return self;
  33. }
  34.  
  35. - newSize
  36. {
  37.   urx=bounds.size.width;
  38.   ury=bounds.size.height;
  39.   
  40.   midx=urx/2;
  41.   midy=ury/2;
  42.  
  43.   n = 0;
  44.   t = 0;
  45.   
  46.   // phases of the three points;
  47.   p1=0;
  48.   p2=(4*M_PI)/3;
  49.   p3=(2*M_PI)/3;
  50.   
  51.   // starting angle of each point;
  52.   t1[0]=0;
  53.   t2[0]=p2;
  54.   t3[0]=p3;
  55.  
  56.  
  57.   // s1 and s2 should define an oval that takes up middle 75% of the screen
  58.   s1 = midx*0.5; s2 = midy*0.5;
  59.   s3 = midx*0.5; s4 = midy*0.5;
  60.  
  61.   n=lper;
  62.   p=(lper/3)*2;
  63.   pp=(lper/3);
  64.  
  65.   return self;
  66. }
  67. @end
  68.  
  69.  
  70.